package com.example.smart.dialog

import android.content.Context
import android.view.Gravity
import android.view.View
import com.example.lib.extend.getDeviceWidth
import com.example.lib.extend.setOnDoubleClickListener
import com.example.smart.R
import com.example.smart.base.dialog.base.BaseDialog
import com.example.smart.databinding.DialogQuestionDoneBinding

class QuestionDoneDialog(context: Context) : BaseDialog<DialogQuestionDoneBinding>(dialogContext = context,
    width = (getDeviceWidth(context) * 0.8).toInt(),
    gravity = Gravity.CENTER) {

    var onClick: (() -> Unit)? = null
    override fun setLayoutRes() = R.layout.dialog_question_done

    override fun afterViewCreate(view: View?) {
        banCancel()
        binding.Go.setOnDoubleClickListener {
            onClick?.invoke()
        }
    }

}